//
//  Survey.h
//  Surveyer
//
//  Created by Qikun Guo on 13-8-19.
//  Copyright (c) 2013年 Tim. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <CoreData/CoreData.h>
#import <MessageUI/MessageUI.h>
#import <ShareSDK/ShareSDK.h>

@class Result, SurveyItem;

@interface Survey : NSManagedObject<MFMailComposeViewControllerDelegate>

@property (nonatomic, retain) NSString * intro;
@property (nonatomic) NSTimeInterval modifiedDate;
@property (nonatomic, retain) NSString * title;
@property (nonatomic) BOOL showPageIndicator;
@property (nonatomic) int16_t time;
@property (nonatomic, retain) NSOrderedSet *items;
@property (nonatomic, retain) NSSet *result;
@end

@interface Survey (CoreDataGeneratedAccessors)

- (void)insertObject:(SurveyItem *)value inItemsAtIndex:(NSUInteger)idx;
- (void)removeObjectFromItemsAtIndex:(NSUInteger)idx;
- (void)insertItems:(NSArray *)value atIndexes:(NSIndexSet *)indexes;
- (void)removeItemsAtIndexes:(NSIndexSet *)indexes;
- (void)replaceObjectInItemsAtIndex:(NSUInteger)idx withObject:(SurveyItem *)value;
- (void)replaceItemsAtIndexes:(NSIndexSet *)indexes withItems:(NSArray *)values;
- (void)addItemsObject:(SurveyItem *)value;
- (void)removeItemsObject:(SurveyItem *)value;
- (void)addItems:(NSOrderedSet *)values;
- (void)removeItems:(NSOrderedSet *)values;
- (void)addResultObject:(Result *)value;
- (void)removeResultObject:(Result *)value;
- (void)addResult:(NSSet *)values;
- (void)removeResult:(NSSet *)values;

- (NSString *)textOutput;
@end
